package behavior.nullObject;

public abstract class AbstractCustomer {
	protected String name;

	public abstract boolean isNil();

	public abstract String getName();

}

class RealCustomer extends AbstractCustomer{
	
	RealCustomer(String name){
		super.name = name; 
	}
	
	@Override
	public boolean isNil() {
		return false;
	}

	@Override
	public String getName() {
		return super.name;
	}
	
}

class NullCustomer extends AbstractCustomer{

	@Override
	public boolean isNil() {
		return true;
	}

	@Override
	public String getName() {
		return "no name";
	}
	
}

